#pragma once
#include "Position.h"
#include "ParallelStraightsException.h"

class GeometryHelper
{
	private: 
		GeometryHelper(void);
		static GeometryHelper* instance;

	public:
		virtual ~GeometryHelper(void);
		static GeometryHelper *getInstance();
		float correctAngle(float angle, int signum);
		float getAngle(float m, int signum);
		float getAngle( Position * p1, Position * p2 );
		float getAngle( Position * p1, Position * p2, int signum);
		Position * getPosition(float distance,float m, Position * origin);
		float calculateDistance(Position * originPoint, Position * endPoint);
		float fx(float x, float m, float b);
		Position * getIntersection(float xRef, float m, float b, float xb2, float m2, float b2 );
		Position * getNearerPoint(Position * point, float xb, float m, float b);
		float getXIntersection(float m1, float b1, float m2, float b2 );
		bool isInfinity(float n);
		int sign(int value);
};
